<html>
<head><meta charset="utf-8"><title>Running a couple tests individually · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html">Running a couple tests individually</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215277747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215277747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Casey Rodarmor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215277747">(Nov 02 2020 at 04:05)</a>:</h4>
<p>I have a couple compiler tests that I'm not sure how to run individually. One is an error code test, in <code>src/error_codes/E0761.rs</code>, and another is an issue test, in <code>src/test/rustdoc/issue32556.rs</code>. How can I run these tests on their own, without running a bunch of other tests?</p>



<a name="215277887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215277887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215277887">(Nov 02 2020 at 04:08)</a>:</h4>
<p><span class="user-mention" data-user-id="255845">@Casey Rodarmor</span> does this work? <code>x.py test src/test/rustdoc --test-args 32556 &amp;&amp; x.py test src/error_codes --test-args 761</code></p>



<a name="215278054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215278054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Casey Rodarmor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215278054">(Nov 02 2020 at 04:13)</a>:</h4>
<p>The first one works, but the second one, for E0761 doesn't work. I actually made a typo, the error code test is in <code>src/error_codes/E0761.md</code>, so it might not have the error code in the test name.</p>



<a name="215278338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215278338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215278338">(Nov 02 2020 at 04:20)</a>:</h4>
<p>I'm not sure, but if you run <code>x.py test -h -v</code> it will print the available paths to test</p>



<a name="215278353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215278353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Casey Rodarmor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215278353">(Nov 02 2020 at 04:22)</a>:</h4>
<p>Ah, super useful, thank you! It looks like it's <code>x.py test compiler/rustc_error_codes</code></p>



<a name="215686067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215686067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Xander Xiao <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215686067">(Nov 05 2020 at 09:10)</a>:</h4>
<p>cargo test test_fn_name</p>



<a name="215740432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215740432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215740432">(Nov 05 2020 at 16:50)</a>:</h4>
<p><span class="user-mention" data-user-id="362066">@Xander Xiao</span> <code>cargo test</code> doesn't work on the rust compiler itself unfortunately</p>



<a name="215740506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Running%20a%20couple%20tests%20individually/near/215740506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Running.20a.20couple.20tests.20individually.html#215740506">(Nov 05 2020 at 16:51)</a>:</h4>
<p>see <a href="#narrow/stream/131828-t-compiler/topic/RIIR.20contributor.20entry.20point">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/RIIR.20contributor.20entry.20point</a> for some more discussion of that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>